import React from 'react';
import { NavBar, Icon } from 'antd-mobile';
import {withRouter} from 'react-router-dom';
import './navbar.css'
const Navbar = (props) => {
  const gobackfun=()=>{
   props.history.go(-1)
  }
  return (
    <NavBar
      mode="light"
      icon={<Icon type="left" />}
      onLeftClick={() => gobackfun()}
    >{props.title}</NavBar>
  );
}

export default withRouter(Navbar);

